<?php
class CommandError
{
	public static function MakeFileNoneExistError($filename)
	{
		$result=new Result();
		$result->ErrorCode='FileNoneExist';
		$result->Messages[]=sprintf(L('File %1$s does not exist'),$filename);
		$result->Rst=false;
		return $result;
	}
	public static function MakeDirNoneExistError($dirname)
	{
		$result=new Result();
		$result->ErrorCode='DirNoneExist';
		$result->Messages[]=sprintf(L('Dir %1$s does not exist'),$dirname);
		$result->Rst=false;
		return $result;
	}
	public static function MakeNotAvailableError($command)
	{
		$result=new Result();
		$result->ErrorCode('Notavailable');
		$result->Messages[]=sprintf(L('Command %1$s is not available'),$command);
		$result->Rst=false;
		return $result;
	}
}
?>